﻿<%@ Page Title="" Language="C#" MasterPageFile="~/PublicPage.Master" AutoEventWireup="true" CodeBehind="SetupDB.aspx.cs" Inherits="Ebiz.SetupDB" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        var cbServer = "<%= cbServer.ClientID %>";
        var cbAuthMode = "<%= cbAuthMode.ClientID %>";
        var txtServer = "<%= txtServer.ClientID %>";
        var txtUsername = "<%= txtUsername.ClientID %>";
        var txtPassword = "<%= txtPassword.ClientID %>";
        var chkServer = "<%= chkServer.ClientID %>";
    </script>
    <script src="js/setupDB.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" runat="server">
    <h3>Setup Database Connection</h3>
    <form id="Form1" runat="server">
        <table id="tblSetup" align="center" cellpadding="3" cellspacing="0" style="font-size:12px;">
            <tr>
                <td align="left">Server Name</td><td>:</td>
                <td style="width:200px;" align="left">
                    <asp:DropDownList ID="cbServer" runat="server" Font-Size="12px" Width="214px">
                    </asp:DropDownList>
                    <asp:TextBox ID="txtServer" runat="server" Width="210px" CssClass="no-display" 
                        Font-Size="12px"></asp:TextBox>
                </td>
                <td align="left">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ErrorMessage="Server Name is required" ControlToValidate="txtServer" 
                        ValidationGroup="SETTING">*</asp:RequiredFieldValidator>
                </td>
                <td>
                    <asp:CheckBox ID="chkServer" runat="server" Text="Enter server manually" />
                </td>
            </tr>
            <tr>
                <td align="left">Log on Mode</td><td>:</td>
                <td align="left">
                    <asp:DropDownList ID="cbAuthMode" runat="server" Font-Size="12px" Width="214px">
                        <asp:ListItem Value="0">--- Select ---</asp:ListItem>
                        <asp:ListItem Value="1">Windows Authentication</asp:ListItem>
                        <asp:ListItem Value="2">SQL Server Authentication</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td align="left">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                        ErrorMessage="Log on Mode is required" ControlToValidate="cbAuthMode" 
                        ValidationGroup="SETTING">*</asp:RequiredFieldValidator>
                </td>
                <td align="left">&nbsp;</td>
            </tr>
            <tr>
                <td align="left">Username</td><td>:</td>
                <td align="left">
                    <asp:TextBox ID="txtUsername" runat="server" Width="210px"></asp:TextBox>
                </td>
                <td align="left">&nbsp;</td>
                <td align="left">&nbsp;</td>
            </tr>
            <tr>
                <td align="left">Password</td><td>:</td>
                <td align="left">
                    <asp:TextBox ID="txtPassword" runat="server" Width="210px" TextMode="Password"></asp:TextBox>
                </td>
                <td align="left">&nbsp;</td>
                <td align="left">&nbsp;</td>
            </tr>
            <tr>
                <td align="left">Database Name</td><td>:</td>
                <td align="left">
                    <asp:TextBox ID="txtDatabase" runat="server" Width="210px"></asp:TextBox>
                </td>
                <td align="left">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        ErrorMessage="Database Name is required" ControlToValidate="txtDatabase" 
                        ValidationGroup="SETTING">*</asp:RequiredFieldValidator>
                </td>
                <td align="right">&nbsp;</td>
            </tr>
            <tr><td align="left" colspan="5">&nbsp;</td></tr>
            <tr>
                <td align="right" colspan="3">
                    <asp:Button ID="btnSave" runat="server" Text="Update Setting" 
                        CssClass="btnSmall" Width="120px" ValidationGroup="SETTING" Height="26px" />
                </td>
                <td align="left" colspan="2">&nbsp;</td>
            </tr>
            <tr>
                <td align="left" colspan="5" 
                    style="color: #FF0000; padding-top: 10px; padding-bottom: 5px;">
                    <%= strPostMsg %>
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                        ValidationGroup="SETTING" />
                </td>
            </tr>
        </table>
    </form>
</asp:Content>
